-- GENERATED SPELL FOR [Grishna Matriarch] --


function spell0_20329(pUnit, Event) --@Detect Whispers,n/a--
pUnit:FullCastSpellOnTarget(37473,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20329', 574, 1)
end

function spell1_20329(pUnit, Event) --@Impending Doom,n/a--
pUnit:FullCastSpellOnTarget(37579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20329', 30000, 1)
end

function spell2_20329(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20329', 3000, 1)
end

function spell3_20329(pUnit, Event) --@Shadow Mend,Heal--
pUnit:FullCastSpellOnTarget(34110,pUnit)
pUnit:RegisterEvent('Sorts_20329', 2500, 1)
end

function Sorts_20329(pUnit, Event)
local choix_sorts_20329 = math.random(0, 3)
if choix_sorts_20329 == 0 then
pUnit:RegisterEvent('spell0_20329', 1, 1)
end
if choix_sorts_20329 == 1 then
pUnit:RegisterEvent('spell1_20329', 1, 1)
end
if choix_sorts_20329 == 2 then
pUnit:RegisterEvent('spell2_20329', 1, 1)
end
if choix_sorts_20329 == 3 then
pUnit:RegisterEvent('spell3_20329', 1, 1)
end
end

function mob20329_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20329', math.random(1500, 3000), 1)
end

function mob20329_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20329_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20329_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20329, 1, 'mob20329_Action')
RegisterUnitEvent(20329, 2, 'mob20329_Leave')
RegisterUnitEvent(20329, 3, 'mob20329_Kill')
RegisterUnitEvent(20329, 4, 'mob20329_Die')
